import axios from './axios.base';

export default {
  async getCarts(params:any={}){
    const target={
      limit:10,
      page:1
    }
    Object.assign(target,params);
    const res=await axios.get('/api/cart',{
      params:target
    });
    return res.data;
  },

  async addCart(data:any={}){
    const res=await axios.post('/api/cart',data);
    return res.data;
  },

  async delCart(id){
    const res=await axios.delete(`/api/cart/${id}`);
    return res.data;
  }

}